﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminCP/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="InfoTech.LanTranh.MucVu.Service" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content-box column-left mucvu">
        <div class="content-box-header">
            <h3>
                Cấu Hình Mục Vụ</h3>
        </div>
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <%
                Html.EnableClientValidation(); %>
            <% 
                using (Html.BeginForm("CauHinhMucVu", "SystemInfo", FormMethod.Post))
                {%>
            <%:Html.ValidationSummary()%>
            <table cellpadding="3" cellspacing="3">
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Phận
                    </td>
                    <td>
                        <div class="editor-field">
                            <%:Html.DropDownList("MAGIAOPHAN", GIAOPHANService.Get_List(),
                                                                              new { style = "width: 200px", @class = "text-input" })%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Hạt
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownList("MAGIAOHAT",GIAOHATService.Get_List_Join_GiaoPhan(), new { style = "width: 200px", @class="text-input" })%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="cellTitle" valign="middle">
                        Giáo Xứ
                    </td>
                    <td>
                        <div class="editor-field">
                            <%: Html.DropDownList("MAGIAOXU",GIAOXUService.Get_List_Join_GiaoPhan_GiaoHat(), new { style = "width: 200px", @class="text-input" })%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <input type="submit" value="Cập nhật" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
                    </td>
                </tr>
            </table>
            <%
                }%>
        </div>
        <!-- End .content-box-content -->
    </div>
    <div class="clear">
    </div>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderCss" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderScript" runat="server">
    <script type="text/javascript" src="<%=Html.AreaScriptPath("AdminCP") %>MucVu.js"></script>
    <script type="text/javascript" src="<%=Html.AreaScriptPath("AdminCP") %>HanhChinh.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $('#MAGIAOPHAN').val('<%=ViewData["DEFAULT_GIAOPHAN"] %>');
            $('#MAGIAOHAT').val('<%=ViewData["DEFAULT_GIAOHAT"] %>');
            $('#MAGIAOXU').val('<%=ViewData["DEFAULT_GIAOXU"] %>'); 
            $("#MAGIAOPHAN").change(function () {
                Change_GiaoPhan('mucvu', '<%=Url.Action("Get_GIAOHAT","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
            $("#MAGIAOHAT").change(function () {
                Change_GiaoHat('mucvu', '<%=Url.Action("Get_GIAOXU","GiaDinhCongGiao",new {area="AdminCP"}) %>', this.value);
            });
        });
    </script>
</asp:Content>
